package forQuest;

public class Demo01 {
    //计算1-100奇数和偶数的和
    public static void main(String[] args) {
        int sum_1 = 0;
        int sum_2 = 0;
        for (int i = 0; i < 100; i++) {
            if(i%2==0){sum_2++;}
            else{sum_1++;}
        }
        System.out.println("奇数和为："+sum_1);
        System.out.println("偶数和为："+sum_2);
    }
}
